package com.halflife.comeElectricity.battery;

import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface BatteryRepository {

    int deleteByPrimaryKey(Integer id);

    int insert(Battery battery);

    int insertSelective(Battery battery);

    Battery selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Battery battery);

    int updateByPrimaryKey(Battery battery);

    List<Battery> selectAll(Map<String, Object> param);

    int selectCount(Map<String, Object> param);

    List<Battery> selectListByPage(Map<String, Object> param);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    List<Battery> selectMany(@Param("sql") String sql);

    @Select({"${sql}"})
    @ResultMap("BaseResultMap")
    Battery selectOne(@Param("sql") String sql);



}